import { ref } from 'vue'
import { GetNotice } from '@/api/course'
import { defineStore } from 'pinia'
export const useAppStore = defineStore(
  'list',
  () => {
    //接收教师发送过来的数据
    const tableData = ref([])
    const info = localStorage.getItem('info')
    // console.log(info)
    const getNotice = async () => {
      const res = await GetNotice(info)
      // console.log(res)
      tableData.value = res.data
    }
    getNotice()
    return {
      tableData,
      getNotice
    }
  },
  {
    persist: true // 开启数据持久化
  }
)
